<?php
require_once('config.php');
require('smarty/smarty_config.php');
require('model/post/post.php');

if (empty($_GET['id'])) {
	header('location:index.php');
	exit;
}
$post = new Post();
// select the detail information of the post with the id =_GET[ID]
$post_detail = $post -> get_post();

#$smarty -> assign('post_id',$post_id);
$smarty -> display('./header.tpl');
$smarty -> assign('post_info',$post_detail);
$smarty -> display('./post/view.tpl');
$smarty -> display('./footer.tpl');
?>